package com.tarry.task;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TaskExecutorTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskExecutorConfig.class);
        AsyncTaskService asyncTaskService = context.getBean(AsyncTaskService.class);
        for ( int i = 1 ; i < 10 ; i++){
            asyncTaskService.executeAsyncTask(i);
            asyncTaskService.executeAysncTaskPuls(i);
        }
        context.close();
    }
}
